/**
 * <AiRmob-Framework; A simple augmented reality framework for android >
    Copyright (C) <2012>  <AiRmob Team>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package rendercomponents;

public class Scene extends Group implements SceneInterface {

	boolean somethingChanged;

	// Used to keep track of the colorID used for picking
	int idNum;
	// number of lights that are in the scene at the moment
	int numLights;
	// number of transparent models that are in the scene at the moment. Used
	// for auto-decision for sorting by distance
	int numTransparentModels = 0;

	// Used Renderer
	Renderer renderer;

	/**
	 * Constructs a new scene. After a scene is given to a renderer all to it
	 * appended objects will be drawn.
	 * 
	 * @param r
	 *            the used renderer
	 */
	public Scene(Renderer r) {
		super(null);
		this.type = 0;
		this.idNum = 1;
		this.numLights = 0;
		this.renderer = r;
	}

	/**
	 * Notify this scene that something has changed. This will trigger the
	 * renderer that uses this scene to rebuild its scene graph.
	 */
	public void notifyChange() {
		this.somethingChanged = true;
	}

	public Identifier addModel(Model3D model) {
		return super.add(model);
	}

	public Identifier addLight(Light light) {
		return super.add(light);
	}
}
